<template>
    <div class="RxNews">
        <rx-layout>
            <template v-slot:center>
                <rx-grid :url="'/api-portal/portal/core/infInnerMsg/queryMsg'">
                    <template v-slot:center="{record}">
                        <div class="rx-news-center" @click="details(record)">
                            <div class="rx-news-top">
                                <div class="rx-news-isRead">
                                    <i class="iconfont icon-Vue3_notice-filled"></i>
                                    <span v-if="record.isRead !='yes'"></span>
                                </div>
                                <div class="rx-news-name">{{ record.msgTitle }}</div>
                            </div>
                            <div class="rx-news-bottom">
                                <span class="rx-news-createTime">{{ record.createTime }}</span>
                                <span class="rx-news-sender">{{ record.sender }}</span>
                            </div>
                        </div>
                    </template>
                </rx-grid>
            </template>
        </rx-layout>
    </div>
</template>

<script>
import RxGrid from '@/components/RxGrid'
import RxLayout from '@/components/RxLayout'

export default {
    name: "RxNews",
    components: {RxGrid, RxLayout},
    data() {
        return {}
    },
    methods: {
        i18n(name, text, key) {
            return this.$ti18(name, text, "bpmLang", key);
        },
        details(record) {
            let url = '/pages/RxProcessManagement/RxNews/RxNewsdetails?params=' + encodeURIComponent(JSON.stringify(record))
            uni.navigateTo({
                url: url
            });
        }
    }
}
</script>

<style scoped>
.RxNews {
    height: 100%;
}
.rx-news-center{
    display: flex;
    flex-direction: column;
    background-color: #FFFFFF;
    margin-bottom: 0.5rem;
    overflow: hidden;
    box-shadow: 0rem 0rem 0rem 0rem rgba(50, 71, 119, 0.06);
    border-radius: 10px;
    padding: 0.5rem;
}
.rx-news-top{
    display: flex;
    align-items: baseline;
    border-bottom: 1px solid rgba(232, 232, 232, 1);
    padding-bottom: 0.5rem;
}
.rx-news-isRead{
    margin-right: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    background-image: linear-gradient(-42deg,
    #7461ff 0%,
    #6ba1ff 100%),
    linear-gradient(#ffc037,
        #ffc037);
    background-blend-mode: normal,
    normal;
    border-radius: 50%;
    text-align: center;
    line-height: 2rem;
    position: relative;
    float: left;
    margin-top: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rx-news-isRead i {
    font-size: 17px;
    color: #FFFFFF;
}
.rx-news-isRead span {
    width: 4px;
    height: 4px;
    background-color: red;
    border-radius: 50%;
    position: absolute;
    display: block;
    right: 5px;
    top: 5px;
}
.rx-news-name{
    flex: 1;
    font-size: 1rem;
}
.rx-news-bottom{
    display: flex;
    padding-top: 0.5rem;
}
.rx-news-createTime{
    flex: 1;
    color: rgba(0, 0, 0, 0.45);
    font-size: 0.8rem;
}
.rx-news-sender{
    font-size: 0.8rem;
    color: rgba(66, 133, 244, 1);
}
</style>
